#! /usr/bin/env python

VERSION='0.1'
APPNAME='hid'

srcdir = '.'
blddir = 'build'

import sys
import waf_dynamo, waf_ddf
import waflib.Options
import TestContext

test_context = None

def init(ctx):
    global test_context
    if 'build' in waflib.Options.commands:
        test_context = TestContext.create_test_context()

def options(opt):
    opt.load('waf_dynamo')

def configure(conf):
    conf.load('waf_dynamo')

    waf_ddf.configure(conf)
    conf.recurse('src')
    conf.env.append_value('INCLUDES', "default/src")
    conf.env.append_unique('DEFINES', 'DLIB_LOG_DOMAIN="HID"')

def build(bld):
    global test_context
    bld.recurse('src')
    TestContext.initialize_test_context(test_context, bld)

def shutdown(self):
    waf_dynamo.run_tests(test_context, valgrind = True)

